/*
 * @Author: doing
 * @Date: 2023-08-10 09:59:24
 * @LastEditors: git config user.name && git config user.email
 * @LastEditTime: 2023-09-07 16:44:31
 * @FilePath: \水果新鲜识别项目\web-admin\src\api\manager.js
 * @Description: 
 * 管理基本的请求接口
 * Copyright (c) 2023 by 1540265624@qq.com, All Rights Reserved. 
 */

import axios from '~/axios'

export function login(body){
    console.log(body)
    return axios.post("/v1/auth/getToken",body)
}

export function getinfo(){
    return axios.post("/v1/auth/getUserInfo")
}

export function logout(){
    return new Promise((resolve,reject)=>{
        resolve({
            "msg": "ok",
            "data": "退出登录成功"
        })
        reject({
            "msg": "非法token，请先登录！",
            "errorCode": 20000
        })
    })
}

export function updatepassword(data){
    return new Promise((resolve,reject)=>{
        resolve({
            "msg": "ok",
            "data": true
        })
        reject({
            "msg": "非法token，请先登录！",
            "errorCode": 20000
        })
    })
}
